package com.hc.sss.lcx.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hc.sss.common.ResultMap;
import com.hc.sss.pojo.AdvertisementApplication;
import com.hc.sss.service.AdvertisementApplicationService;

@RequestMapping("AdvertisementApplication")
@RestController
public class AdvertisementApplicationController {

	@Autowired
	AdvertisementApplicationService advertisementApplicationService;
	
	@RequestMapping("add")
	public int addAdvertisementApplication(AdvertisementApplication advertisementApplication) {
		return advertisementApplicationService.insertSelective(advertisementApplication);
	}
	
	//删除广告申请llz
	@RequestMapping("deleteAdvertisementApplication")
	public int deleteAdvertisementApplication(Integer aaId) {
		return advertisementApplicationService.deleteAdvertisementApplication(aaId);
	}
	
	//修改广告申请llz
	@RequestMapping("updateAdvertisementApplication")
	public int updateAdvertisementApplication(AdvertisementApplication advertisementApplication) {
		return advertisementApplicationService.updateAdvertisementApplication(advertisementApplication);
	}
	
	//查看广告申请加分页llz
	@RequestMapping("/findAdvertisementApplicationList")
	public ResultMap<AdvertisementApplication> findAdvertisementApplicationList(Integer page,Integer limit){
		Map<String, Object> paramMap = new HashMap<>();
		paramMap.put("page", page);
		paramMap.put("limit", limit);
		ResultMap<AdvertisementApplication> resultMap = advertisementApplicationService.findAdvertisementApplicationList(paramMap);
		return resultMap;
	};
}
